<!doctype html>
<html>
    <head>
        <meta charset="UTF-8" />
        <title>AusStage Researching Audiences Service</title>
        <style type="text/css" media="screen">@import "assets/jqtouch/jqtouch.css";</style>
        <style type="text/css" media="screen">@import "assets/jqtouch/themes/ausstage/theme.css";</style>
        <script src="assets/jqtouch/jquery.1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
        <script src="assets/jqtouch/jqtouch.min.js" type="application/x-javascript" charset="utf-8"></script>
          <script src="assets/jqtouch/extensions/jqt.location.js" type="application/x-javascript" charset="utf-8"></script>
		<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>

        <script type="text/javascript" src="assets/javascript/chain-0.2.js" type="application/x-javascript" charset="utf-8"></script>


        <script type="text/javascript" charset="utf-8">
            var jQT = new $.jQTouch({
                icon: 'assets/jqtouch/themes/ausstage/img/icon.png',
                addGlossToIcon: false,
                startupScreen: 'assets/jqtouch/themes/ausstage/img/startup.png',
                statusBar: 'black',
                preloadImages: [
                    'assets/jqtouch/themes/ausstage/img/back_button.png',
                    'assets/jqtouch/themes/ausstage/img/back_button_clicked.png',
                    'assets/jqtouch/themes/ausstage/img/button_clicked.png',
                    'assets/jqtouch/themes/ausstage/img/grayButton.png',
                    'assets/jqtouch/themes/ausstage/img/greenButton.png',
                    'assets/jqtouch//themes/ausstage/img/loading.gif'
                    ]
            });
			
        	//Glabals
			var gCurrentPerformance = 0 ;
			
			//Setup   Google analytics  
		    var _gaq = _gaq || [];
		    _gaq.push(['_setAccount', 'UA-10089663-2']);		
		  (function() {
			var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
			ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
			var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
		  })();
		  
  
 
			  /**
			  * The Jquery document ready. Acts like the main. 
			  *  See if there is any url varialbes and 
			  *  the user directly to that feedback if that is the case. 
			  *  If there is now URL variable then the current peformance list is loaded in on the homepage   
			  */
						   
		   $(document).ready(function() {			
		
			  			
			//Do have any URL variables - if so load those and then display the current performance form.    
			if(window.location.href.indexOf('?') != -1) {
				
				var performanceVariables = ['p','performance'];
					for (var i = 0; i < performanceVariables.length; i++) {
						if (getUrlVars()[ performanceVariables[i]]) {
							gCurrentPerformance = getUrlVars()[ performanceVariables[i]];
							_gaq.push(['_trackPageview', 'DirectLinkToForm/?performance=' + gCurrentPerformance ]);
	
							getPerformanceData(gCurrentPerformance);	
							jQT.goTo('#FeedbackDisplayWithForm');
						}
					
				}
			} else {
			// trigger the loading of the current peformnaces   
				//getCurrentPerformances ();
				getPerformances (0,0,'.currentPerformancesBlock')
			}
			 
			
		});
		
		/**
		* Takes data objects and converts it to yyyy-mm-dd string  
		* @param  date  is he data object that is going be converted  
		* @returns returns the date in yyyy-mm-dd form  
		*/	
			
		function reFormatDatetoYYYYMMDD (date){
			
			var year = date.getFullYear();  
			var month = date.getMonth() +1;//correct for Jan being 00
			//Reformat the month if it's be 10   
			if(month < 10) {  
				var month  =  '0' + month;
				};

			
			var day = date.getDate(); 
			//Reformat the  day if it's less than 10  
			if(day < 10) {  
				var day =  '0' + day;
			};
			
			var dataString =  '' + year + '-' + month + '-' + day;
			return dataString; 
		}


		/** 
		* Looks at the date and gets peformances based on dates the current, loads this include the current peformances and recent performaces. It actuall does API call twic. 
		* The api call it's makeing looks like  http://beta.ausstage.edu.au/mobile/lookup?task=date&startdate=2010-01-01&enddate=2011-05-05
		* More details about that dpi are are at http://code.google.com/p/aus-e-stage/wiki/MobileServiceAPILookup#Date_Lookup_Data_Fields
		* @param  start  How many days in the past to look back    
		* @param  end    How many days formward to look  
		* @param  target  What part of the DOM are targetting to display the results    

		*/
						   
		function getPerformances (start,end,target){
		   
		   	   //figure out which server this running on what the data type should be  
			   host = buildHost();
			   var mydataType = getDataType(); 
			   
			   //set up the date
			   //var startdate = new Date('Dec 12 2010'); // FOR TESTING
                            var startdate = new Date();

			   //enddate.setDate(startdate.getDate() + 10);
                           
			   startdate.setDate(startdate.getDate() - start);
			   //window.console.log(startdate.toDateString());
                           //
                           //Now formatted the into yyyy-mm-dd

                           startdateString = reFormatDatetoYYYYMMDD(startdate);
			   //window.console.log(startdateString);

                           
                            //var today = new Date('Dec 12 2010'); // FOR TESTING
                            var today = new Date();
                            var enddate = today;
                            
                            enddate.setDate(today.getDate() + end);

                           //Now formatted the into yyyy-mm-dd
                            enddateString = reFormatDatetoYYYYMMDD(enddate);
			    //window.console.log(enddateString);
                            
                            if (end == 0 && start == 0 ) {				  // build the query string
                               //don't include the end date'
                               var params = {
                                             task:'date',
                                             startdate: startdateString,

                                     };
                             } else {
                               var params = {
                                             task:'date',
                                             startdate: startdateString,
                                             enddate: enddateString,


                                     };
                             }
				 
				 var values = jQuery.param(params);//encode thos
				
				var source =  host + '/mobile/lookup?' +  values;
				
				//window.console.log(source);
								
				$.ajax({
						type:   'GET',
						url: source, 
						dataType:  mydataType,
						cache: false,
						success: function (data) {
						//window.console.log(data);
						//see if we have some data only the display the current performances and load them  
						if (data.length !=  0) {
							//Sort by the startDateTime
							
							data.reverse(); 
							
							//Take the loaiding class off and the display the block inside of that 	
							$(target).removeClass("loading");
							$(target).css("display","block");
							
								//Got the date and now load that into the current performances.  
								//Clear what is there current 
								$(target + ".Performances").empty();
		
									// add the list of feedback
									for(var i = 0; i < data.length; i++) {
										//window.console.log(data);
										var item = data[i];
										//$(target + ".Performances").append('<li class="arrow">' +
										$(target + ".Performances").append('<li class="arrow">' +
												'<a href="#FeedbackDisplayWithForm" ' + 
												 ' onClick="loadFeedbackForm(event)" ><div class="event">' +
													item.event + '</div>' + 
												'<span class="startDateTime">' + item.startDateTime + '</span><br / >' +			
												'<span class="organisation"> ' + item.organisation  + ', </span>' +
												'<span class="venue">' + item.venue +' </span>' +
												'<span class="performance">' +
													item.id +
											'</span></a></li>');
									}
									
							} else {
								//Nothing found so we turn off the display
								//$(target).css("display","none");
								$(target).removeClass("loading");
								$(target + ".Performances").empty();

								$(target + ".Performances").append('<li class="arrow">' +
												'<a href="#home" ' + 
												 '  ><div class="event"> No Performances Found' +
													'</div></a></li>');
											
											
								
							}
																	
						},
					//Some thing has gone wrong, show the user an error screen.  
					error:function (xhr, ajaxOptions, thrownError){
						
                    	//alert(xhr.status);
                    	//alert(thrownError);
						jQT.goTo('#Error');

                	},
					async: true 
					}); 
					
		}
		
		
		
		

		
		/*
		* Get the URL var and takes the user to the current form for that performance.    
		* 
		*/ 			
		
		function getUrlVars()
				{
					var pairs;
					var pairs = window.location.href.slice(window.location.href.indexOf('?') + 1);

					//the url might be ?p=4#Home so we make sure we just dealing bit before the #
					if (pairs.indexOf("#") != -1) {
						var firstArray = pairs.split('#'); //make that into array rid of it.
						var UrlVars = firstArray[0];    
					} else {
						var UrlVars = pairs[0];
					
						//just return the first param 
					}
					
					//window.console.log("url variables = " + UrlVars);					
						
					 var vars = [], hash;
					 var hashes = UrlVars.split('&');
					 
					 for(var i = 0; i < hashes.length; i++)
						{
							hash = hashes[i].split('=');
							vars.push(hash[0]);
							vars[hash[0]] = hash[1];
					}
					
					return vars;
					
			
			
		}
		
		/**
		* Called form the submit button.  Reads the information form the current form submits and the reloads the page. 
		*/
		
		function submitForm(){
			
			 // window.console.log("about to submit the form");
			   
			   _gaq.push(['_trackPageview', 'FormSubmitted/?performance=' + gCurrentPerformance ]);
				$('.submit').html('Loading');
				//figure out which server we one 
				
				host = buildHost();
			    var mydataType = getDataType(); 
			   
		 		//var gCurrentPerformance = $('.class')	
							    
 				  	
				//Get the date and time; 
				/* OLD material
				var CurrentDate = new Date(); 
				var currentTime =  CurrentDate.toTimeString();
				//Change the format of the date so that works with API
				currentTime =  currentTime.replace(" (EST)", "", "gi");  
				currentTime =  currentTime.replace("GMT", "", "gi");  
				currentTime =  currentTime.replace(" (CST)", "", "gi");  
				*/
				//bulld the  
				
				// get the message form the form
				
				var message =  $('[name=message]').val();
				
				//get the current peformance from the form. 
				gCurrentPerformance = $(".CurrentPerformance").html(); 

				
				 var params = {
					 
					 type:'mobile-web',
					// time:currentTime,
					// date:CurrentDate.toDateString(),
					 performance:gCurrentPerformance,
					 message:message	 
				 
				 };
				 var values = jQuery.param(params);//encode thos
				
				var source =  host + '/mobile/gatherer?' +  values;

				//window.console.log(source);
				
				//remove what is currently is being shown 
				$(".feedback").items('remove').chain();//load this data in the feedback
				$(".feedbackForm").items('remove').chain();//load this data in the feedback 
				
				$.ajax({
						type:   'GET',
						url: source, 
						cache: false,
						dataType: mydataType,
						success: function (data) {
							//window.console.log(data);

							//$(".feedback").items('remove').chain();//load this data in the feedback
							
							//$(".feedback").items('replace',data.feedback.reverse()).chain();//load this data in the feedback
							//$("#FeedbackDisplay").item(data).chain();//load this data in the feedback 
							
							$(".feedbackForm").empty();
							
							 data.feedback.reverse();
							// add the list of feedback
							for(var i = 0; i < data.feedback.length; i++) {
								item = data.feedback[i];	
								//window.console.log(item.content);

								$(".feedbackForm").append('<li>' +

											'<div class="content">' + item.content + '</div>' +
											'<span class="feedback-about">' + 
						   
												'<span class="date">' + item.date +' </span>' +
												'<span class="time">' + item.time +' </span>' +
												'<span class="type">' + item.type +' </span>' +
                       						
											'</span>'
								+'</li>');
								
							}
				
				
							
							$('.submit').html('Submit');

							//	jQT.goTo('#FeedbackDisplayWithForm');

						},
						error:function (xhr, ajaxOptions, thrownError){
                    	alert(xhr.status);
                    	alert(thrownError);
						jQT.goTo('#Error');

                	},
					
						async: true 
					});	
		}
		
		/**
		* Add's the current location to  .LocInfo 
		* @param text   The text to be added to class .LocInfo  
		*/	
					
		 function setLocDisplay(text) {
					$('.LocInfo').empty().append(text);
					
                }
		
		/**
		* After the phone location has been found, this calls the API and loads the information the LI
		* API call looks like http://beta.ausstage.edu.au/mobile/lookup?task=location&lat=-35.02470743224244&lng=138.572359085083&distance=1000
		* @param latitude  
		* @param longitude   

		*/
		
				
		function findPerformances(latitude,longitude) {
			
			///http://beta.ausstage.edu.au/mobile/lookup?task=location&lat=-35.02470743224244&lng=138.572359085083&distance=1000
			
			//now do the stuff to make the host names work 
			
				host = buildHost();
	 		    mydataType = getDataType(); 
 			
	
				  
				  var params = {
					 
					 task:'location',
					 lat:latitude,
					 lng:longitude,
					 distance:1000, // BUG - this maybe no large enought
				 };
				 
				 var values = jQuery.param(params);//encode thos
				
				var source =  host + '/mobile/lookup?' +  values;				
				//window.console.log(source);
								
				$.ajax({
						type:   'GET',
						url: source, 
						dataType: mydataType,
						cache: false,
						success: function (data) {
							
						//window.console.log(data);
						$(".performances").empty();
						
						if(data.length > 0){
							//found some performances so updatae 
							// add the list of feedback
							for(var i = 0; i < data.length; i++) {
								//window.console.log(data);
								var item = data[i];
								//window.console.log(item);
	
								$(".NearByPerformances").append('<li class="arrow">' +
										//'<div class="performances">' +
										'<a href="#FeedbackDisplayWithForm"' + 
										 'onClick="loadFeedbackForm(event)"><div class="event"></div><br \>' + 
										'<span class="startDateTime">' + item.startDateTime + '</span>' +			
										'<span class="organisation"> ' + item.organisation  + ', </span>' +
              						    '<span class="venue">' + item.venue +' </span>' +
										'<span class="performance">' +
											item.id +
											'</span></a></li>');
							}
		
		
						} else {
							// got no data so display a message saying that. 
							
								$(".NearByPerformances").empty();
								$(".NearByPerformances").append('<li class="arrow">' +
								 '<a href="#home" >No performances found</a></li>');
								

						}
							
						},
					
					error:function (xhr, ajaxOptions, thrownError){
                    	//alert(xhr.status);
                    	//alert(thrownError);
						jQT.goTo('#Error');

                	},
				
				
					async: true 
					}); 
					
				  
		}
		
		/**
		* Does the look up of  the current location and calles findPerformances and convertLatLongToPlace, which triggers the updates to the interface   
		*/
		
		
		function findLocation(){
				 _gaq.push(['_trackPageview', 'PerformancesNearBy']);

                // We pass "updateLocation" a callback function,
                // to run once we have the coordinates.
                // We also set it to a variable, so we can know
                // right away if it's working or not
				
				//findPerformances(-35.02470743224244, 138.572359085083);
                var lookup = jQT.updateLocation(function(coords){
                    if (coords) {
						findPerformances(coords.latitude,  coords.longitude);
						convertLatLongToPlace(coords.latitude,  coords.longitude);
						//convertLatLongToPlace(-42.8880971, 147.32766);

				
                    } else {
                       setLocDisplay('Device not capable of geo-location.');
                    }
                });

                if (lookup) {
                    setLocDisplay('Looking up location&hellip;');
                }		
					
					
					
		}
		
		/*
		*  Using the Google MAP api try the LAT and LONG into a place name 
		*   
		*/ 
		
		function convertLatLongToPlace(lat, lng) {
    		geocoder = new google.maps.Geocoder();
			var latlng = new google.maps.LatLng(lat, lng);

			geocoder.geocode({'latLng': latlng}, function(results, status) {
			  if (status == google.maps.GeocoderStatus.OK) {
				if (results[1]) {
				 setLocDisplay('Your location is ' + results[1].formatted_address);

				}
			  } else {
				alert("Geocoder failed due to: " + status);
			  }
 		   });
	
		}
	
		/*
		* Get the current host name from the location string   
		* @returns host as a string    
		*/ 
		
		function buildHost() {
			
			 var host = $(location).attr('host');
			  if (host != 'http://beta.ausstage.edu.au')  { 
					  host = 'http://beta.ausstage.edu.au';				  
			  }
			  return host;
				  
			
		}
		/*
		* See if the data types should be jsonp or json, it does his based on host. The only server that josn will work on is http://beta.ausstage.edu.au   
		* 
		* @returns data as a string, it will be json or json.     
		*/ 
		
		function getDataType() {
			 	var host = $(location).attr('host');
			   if (host != 'http://beta.ausstage.edu.au')  { 
					  return 'jsonp';
				  } else {
					  return 'json';
				  }
		
		}
		
		/*
		* Load the peformance data and last feedback into the actual form.    
		* 
		* @param  gCurrentPerformance the current performane we are working thi   
		*/ 
				  
		function getPerformanceData(gCurrentPerformance) {
				
				//Do Google Analytics
				
				_gaq.push(['_trackPageview', 'LoadingPerformanceData/?performance=' + gCurrentPerformance]);
					
				//change the Interfaace to show that is loading 
				
				$('.submit').html('Loading');
				
				//find out what server we are running on make sure the data type is right 
				host = buildHost();
			 	mydataType = getDataType(); 
				
				//alert(gCurrentPerformance);
				
				//now build the url/calll  for API 
				
				var source =  host + '/mobile/feedback?task=initial&performance=' + gCurrentPerformance  ;  //TODO code to see what server the system is running on and build this URL 
				
				//window.console.log(source);
				
				//The important bit more  
				$.ajax({
						type:   'GET',
						url: source, 
						dataType: 'jsonp',
						cache: false,
						success: function (data) {
							
								$("#FeedbackDisplayWithForm").item(data).chain();//load this data in the feedback 	populate(data);
								//make sure the current peformance in the html so can pick it up later.  
								$(".CurrentPerformance").html(gCurrentPerformance);
								
							//$(".feedback").items('replace',data.feedback).chain();//load this data in the feedback
							
							$(".feedbackForm").empty();
							
							 data.feedback.reverse();
							// add the list of feedback
							for(var i = 0; i < data.feedback.length; i++) {
								item = data.feedback[i];	
								//window.console.log(item.content);

								$(".feedbackForm").append('<li>' +

											'<div class="content">' + item.content + '</div>' +
											'<span class="feedback-about">' + 
						   
												'<span class="date">' + item.date +' </span>' +
												'<span class="time">' + item.time +' </span>' +
												'<span class="type">' + item.type +' </span>' +
                       						
											'</span>'
								+'</li>');
							}
				
				
							$('.submit').html('Submit');
							//window.console.log(data);
						},
					
					error:function (xhr, ajaxOptions, thrownError){
                    	//alert(xhr.status);
                    	//alert(thrownError);
						jQT.goTo('#Error');

                	},
				
				
					async: true 
					}); 			

		}; 
		
		
		/*
		* Called from some like 
		*<a href="#FeedbackDisplayWithForm" onClick="loadFeedbackForm(event)"><div class="event">
     	*   Be Your Self
    	*   </div>
    	*   <span class="startDateTime">Australian Dance Theatre/Garry Stewart</span> <br>
    	*                        
    	*   <span class="organisation">  </span>
    	*   <span class="venue"></span>
    	*   <span class="performance">46</span></a>
    	*   </li>
							   
		*  Pick up the text inside the performnace class and then triggers the actual ajax loading  
		*   
		*/ 
				
		
		function loadFeedbackForm() {
		 
		  //var element = (event.target.nodeName == "LI") ? event.target.parentNode : event.target;
		  //Get the event's parent  
		  var element = event.target.parentNode;
		 
		  //window.console.log( event.target.parentNode);
		 // window.console.log($(".performance",element).text());
		 
		  //Get the performance element =
		  var gCurrentPerformance = $(".performance",element).text();
		 
		  
		  //get the ajax loading started  
		  getPerformanceData(gCurrentPerformance);

				
		}; 
		
		

        </script>
        <style type="text/css" media="screen">
            body.fullscreen #home .info {
                display: none;
            }
 
        </style>
    </head>

    <body >

         <div id="home" class="current">
            <div class="toolbar">
            	<img src="assets/jqtouch/themes/ausstage/img/logo.png" />
                <h1>AusStage</h1>
                <a class="button slideup" id="infoButton" href="#About">About</a>
            </div>
            
            <div class="info round">
                <p>Aus-e-Stage Researching Audiences Project</p>
            </div>
      	
            <ul class="rounded">
            
            <li class="arrow"><a href="#Near" onClick="findLocation()">Performances near you</a> </li> 
            <li class="arrow"><a href="#Recent" onClick="getPerformances(5,0,'.recentPerformancesBlock')">Recent Performances</a></li>
           <!-- <li class="arrow"><a href="#Upcoming" onClick="getPerformances(0,7,'.upcomingPerformancesBlock')"> Upcoming Performances</a></li> -->
			<li class="arrow"><a href="#About">About</a> </li>

            </ul>

            	<span class="currentPerformancesBlock loading"></span>
            	<!--<span class="currentPerformancesBlock loading">-->
                    <h3  class="currentPerformancesBlock">Current Performances</h3>
                     <ul class="Performances rounded currentPerformancesBlock performances">
                        
             	    </ul>
      
      
           <div class="toolbar">
               <a class="button" id="infoButton" href="http://beta.ausstage.edu.au/mobile/mobile-vis/">View full site</a>

            </div>


             <script type="text/javascript" charset="utf-8">_gaq.push(['_trackPageview', 'Home']);</script>
        </div>
   
   
    <div id="Upcoming">
            <div class="toolbar">
                <h1>Upcoming</h1>
                <a class="back" href="#">Back</a>
                <a class="button slideup" id="infoButton" href="#About">About</a>
            </div> 
         
  		      	<span class="upcomingPerformancesBlock loading"></span>
                    <ul class="Performances rounded upcomingPerformancesBlock  performances ">
             	    </ul>
                    
                                 
      
    </div>


     
 <div id="Recent">
            <div class="toolbar">
                <h1>Recent</h1>
                <a class="back" href="#">Back</a>
                <a class="button slideup" id="infoButton" href="#About">About</a>
            </div> 
         
  		      	<span class="recentPerformancesBlock loading"></span>
                    <ul class="Performances rounded recentPerformancesBlock performances">
             	  </ul>
                    
                                 
      
</div>



 <div id="Near">
            <div class="toolbar">
                <h1>Near By</h1>
                <a class="back" href="#">Back</a>
                <a class="button slideup" id="infoButton" href="#About">About</a>
            </div> 
         
  		<div class="LocInfo info round">
                <p>Looking up location&hellip;</p>
            </div>
                     
        <ul class="rounded NearByPerformances">
           <li class="arrow">
             Searching 
            </li>		   
        </ul>              
      
</div>


      
          <div id="About">
            <div class="toolbar">
                <h1>About</h1>
                <a class="back" href="#">Back</a>
                 <a class="button" id="infoButton" href="#About">About</a>

            </div>  
            
              <div id="about" class="selectable">
            <p>AusStage documents the performing arts in Australia. Future generations, researchers and contemporary audiences can log on to AusStage, search and retrieve information about, company and performer histories, maps, tours and, links to related material, all at <a href="http://www.ausstage.edu.au.">www.ausstage.edu.au.</a> For free.</p>
            <p>AusStage now provides audiences with the chance to contribute to this important cultural record by letting companies know what you thought of the production you're seeing right now. You can use your phone to send a text message or, if you're a tweeter you can use Twitter or, if you'd like to jump on the web and use the mobile web site you could do that too.</p>
            <p>Don't worry – AusStage doesn't record or store ANY IDENTIFYING INFORMATION about you. In fact, it doesn't even record the phone number or Twitter account you've used to respond so there's no way that they, or the company whose show you're talking about, can tell who you are, let alone contact you.</p>
            <p>Recording audience responses to performance is important for companies, researchers, performers and you. It fleshes out our cultural history and will provide future generations with a richer and fuller understanding of what we did, saw, liked and didn't like.</p>
            <p>This project is being led by Flinders University alongside the companies and artists who you are seeing tonight. It has been funded by the National e-Research Architecture Taskforce (NeAT).</p>
            <p>If you do decide that you'd like to have your say about what you see tonight your standard costs for SMS and network access apply. If you are under 18 years, you must ask for your parent/guardian's permission to participate in this study. As mentioned your participation is voluntary, you will NOT be identified in any results and your response will be stored confidentially (however,please note that sending information via mobile devices is inherently insecure).</p>
            <p>This research project has been approved by the Flinders University Social and Behavioural Research Ethics Committee (Project Number 4892). For more information regarding ethical approval of the project the Executive Officer of the Committee can be contacted on human.researchethics@flinders.edu.au.</p>
            <p>Any enquiries you may have concerning this project should be directed to Jonathan Bollen on 8201 5874 or by email to <a href="mailto:jonathan.bollen@flinders.edu.au">jonathan.bollen@flinders.edu.au</a></p>
                            <p><br /><br /><a href="#" class="grayButton goback">Back</a></p>
                </div>            
                            
                            
             <script type="text/javascript" charset="utf-8">_gaq.push(['_trackPageview', 'Search']);</script>
        
         </div> 
        
       
     
                           
	 <div id="FeedbackDisplay">
            <div class="toolbar">
                <h1 class="event"></h1>
                <a class="back" href="#">Back</a>
               <a class="button slideup" id="infoButton" href="#About">About</a>

            </div>             
            
             <div class="info">
                <div class="event">event</div>
                <div class="organisation">organisation</div>
                <div class="venue">venue</div>
                <div class="date">date</div>
            </div>
            
           <span class="performance"></span>
           <h3 class="question"></h3>
			
            <ul class="feedback">
                    <li>
                        <span class="content"></span>
                        <span class="date"></span>
                        <span class="time"></span>
                        <span class="type"></span>

                    /li>
            </ul>
         	
         
         </div>  
         
            
            
         <div id="FeedbackDisplayWithForm">
            <div class="toolbar">
            

                <h1></h1>
                <a class="button" id="refreshButton"  href="#FeedbackDisplayWithForm"  onClick="getPerformanceData()">
                            	<img src="assets/jqtouch/themes/ausstage/img/refresh.png" />
                </a>
                <a class="back" href="#">Back</a>
               <a class="button slideup" id="infoButton" href="#About">About</a>

            </div>             
            
             <div class="info round">
             <div class="event"></div>
            <div class="organisation">Loading</div>
            <span class="venue"></span>
            <span class="date"></span>
            </div>
            
           <span class="CurrentPerformance"></span>

             
         <form id="submit-feedback" action="" method="GET" class="form">
        		<h3 class="question">Question</h3>
				<ul class="rounded" >
            		<li class="form"><textarea placeholder="" name="message"></textarea></li>
               </ul>

 			<a  href="#" onClick="submitForm()" class="greenButton submit">Submit</a>
         </form>
        	
            
     
            <ul class="feedbackForm edgetoedge">
                    <li>
                    
                        <div class="content">Loading .... </div>
                        <span class="feedback-about">
                            <span class="date"></span>
                            <span class="time"></span>
                            . Via <span class="type"></span>
                        </span>
                    
                    </li>
            </ul>

                 <div class="toolbar">
                <a class="back" href="#">Back</a>

            </div>
           
         </div>  
         
         
           <div id="Error">
            <div class="toolbar">
                <h1>Error</h1>
               <a class="button slideup" id="infoButton" href="#About">About</a>

            </div>             
            
             <div class="info">
            
            	Something has gone wrong, that performance has cann't be found. Try going back the home page. 
                 
 			<a style="margin:0 10px;color:rgba(0,0,0,.9)" href="#home"  class="whiteButton">Home</a>
                
                
            </div>
                  <script type="text/javascript" charset="utf-8">_gaq.push(['_trackPageview', 'Error']);</script>

                  
         </div>  
         
         
            
      
    </body>

</html>